#set(seoTitle="忘记密码")
#@layout()
#define main()
<div class="wrap" id="wrap">
	<div class="container">
		<div class="row">
			<div class="main clearfix">
				<!-- 内容容器 -->
				<div class="col-md-6 col-xs-12 col-md-offset-3 ptl">
				    <div class="panel panel-default panel-page">
				      <div class="panel-heading"><h2>重设密码</h2></div>
				      <form id="password-reset-form" class="form-vertical" method="post" data-widget-cid="widget-10" style="display: block;">
				        <div class="form-group">
				          <label class="control-label required" for="form_email" ><a style="cursor: pointer;">邮箱地址
				            </a></label>
				          <div class="controls ml10">
				            <input type="email" id="email" name="email" required="required" class="form-control forget_psw" data-widget-cid="widget-11" data-explain="请输入你在德眼视频注册时填写的邮箱地址">
				            <p class="help-block">请输入你在德眼视频注册时填写的邮箱地址</p>
				          </div>
				        </div>

				        <div class="form-group">
				          <div class="controls ml10">
				            <button type="submit" id="submit_btn" class="btn btn-primary" data-loading-text="正在发送重设密码邮件...">重设密码</button>
				          </div>
				        </div>
				      </form>
				    </div><!-- /panel -->

				  </div>
			</div>
		</div>
	</div>
</div>
#end

#define js()
	<script type="text/javascript" src="/assets/layer-v3.0.2/layer/layer.js"></script>

	<script type="text/javascript">
		$(document).ready(function() {
			$("#submit_btn").bind("click", function() {
				$.ajax("/login/sendRetrievePasswordEmail", {
					type: "POST"
					, cache: false
					, dataType: "json"
					, data: { email:  $("#email").val() }
					, beforeSend: function() {
						$("#submit_btn").attr("disabled", true);
					}
					, success: function(ret) {
						layer.msg(ret.msg, {
									shift: ret.isOk ? 0 : 6
									, shade: 0.3
									, time: 0
									, offset: "130px"
									, closeBtn: 1
									, shadeClose: false
									,maxWidth: "1000"
								}, function () {
									if (ret.isFail) {
										$("#submit_btn").attr("disabled", false);
									}
								}
						);
					}
				});
			})
		});
	</script>
#end